package com.ub.party.common.constants;

/**
 * Created by HANRAN177 on 2015/9/6.
 */


public enum TagSortTypeEnum {
    LIKE_COUNT_DESC(1, "按照点赞数量降序排序"), CREATE_TIME_DESC(2, "按照创建时间降序排序");
    private int typeId = 0;
    private String typeName = null;

    TagSortTypeEnum(int typeId, String typeName) {
        this.typeId = typeId;
        this.typeName = typeName;
    }

    public static TagSortTypeEnum getByTypeId(int typeId) {
        for (TagSortTypeEnum tagSortTypeEnum : TagSortTypeEnum.values()) {
            if (tagSortTypeEnum.getTypeId() == typeId) {
                return tagSortTypeEnum;
            }
        }
        return null;
    }

    public int getTypeId() {
        return typeId;
    }

    public void setTypeId(int typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
}

